//
//  MoreSortCell.m
//  reSearchDemo
//
//  Created by 科技 on 15/10/13.
//  Copyright (c) 2015年 Kiwaro. All rights reserved.
//

#import "MoreSortCell.h"
@interface MoreSortCell() {
    UILabel *title;
    UIImageView *headImage;
}


@end

@implementation MoreSortCell

- (void)awakeFromNib {
    // Initialization code
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        title = [[UILabel alloc] init];
        [self.contentView addSubview:title];
        
        headImage = [[UIImageView alloc] init];
        [self.contentView addSubview:headImage];
    }
    
    return self;
}

- (void)setModel:(NSString *)model {
    NSString *str = model;
    headImage.frame = CGRectMake(20, 10, 40, 40);
    headImage.image = [UIImage imageNamed:[NSString stringWithFormat:@"Cell_%ld",(long)_row + 1]];
    
    title.frame = CGRectMake(CGRectGetMaxX(headImage.frame) + 10, CGRectGetMinY(headImage.frame), CGRectGetWidth(self.frame)- CGRectGetMaxX(headImage.frame) - 20, CGRectGetHeight(headImage.frame));
    title.text = str;
    
//    NSString *height = [NSString stringWithFormat:@"%f",CGRectGetMaxY(headImage.frame) + 10];
//    [model setValue:height forKey:@"height"];
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
